function ajax(url,params,func){
	// params is the post params string
	// msg is the "please wait" message 
	
	// Try to create the AJAX object (XMLHttpRequest or ActiveX depending of the web browser)
	var myhttpreq = false;
	if (window.XMLHttpRequest){ // Mozilla, Safari...
		myhttpreq = new XMLHttpRequest();
	}
	else if (window.ActiveXObject){ //IE
		try{
			myhttpreq = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e){
			try {
				myhttpreq = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e){
				return false;
			}
		}
	}
	
	//AJAX POST REQUEST
	myhttpreq.open("POST", url, true);
	myhttpreq.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	myhttpreq.setRequestHeader("Content-length", params.length);
	myhttpreq.setRequestHeader("Connection", "close");
	myhttpreq.send(params);
	myhttpreq.onreadystatechange = func; // ajax callback
}
function resultsReady() {
	//this function is called when the AJAX response is ready
	if(this.readyState == 4 && this.status == 200) {
		document.getElementById("results").innerHTML = this.responseText; //Display the response into the results div
		
	}
}
